CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)

PROJECT(VTKExamples)
INCLUDE_REGULAR_EXPRESSION("^.*$")

IF(NOT VTK_BINARY_DIR)
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
ENDIF(NOT VTK_BINARY_DIR)

# Most examples require rendering support.
IF(VTK_USE_RENDERING)
  ADD_SUBDIRECTORY(Build/vtkLocal)
  ADD_SUBDIRECTORY(Build/vtkMy)
  ADD_SUBDIRECTORY(AMR/Cxx)
  ADD_SUBDIRECTORY(Annotation/Cxx/LabeledMesh)
  ADD_SUBDIRECTORY(MultiBlock/Cxx)
  ADD_SUBDIRECTORY(GUI/Motif)
  ADD_SUBDIRECTORY(DataManipulation/Cxx)
  ADD_SUBDIRECTORY(Hybrid/Cxx)
  ADD_SUBDIRECTORY(ImageProcessing/Cxx)
  ADD_SUBDIRECTORY(IO/Cxx)
  ADD_SUBDIRECTORY(Medical/Cxx)
  ADD_SUBDIRECTORY(Modelling/Cxx)
  ADD_SUBDIRECTORY(Rendering/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step1/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step2/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step3/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step4/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step5/Cxx)
  ADD_SUBDIRECTORY(Tutorial/Step6/Cxx)
  ADD_SUBDIRECTORY(VisualizationAlgorithms/Cxx)
  ADD_SUBDIRECTORY(VolumeRendering/Cxx)
  ADD_SUBDIRECTORY(Widgets/Cxx)
  IF(VTK_USE_PARALLEL)
    ADD_SUBDIRECTORY(ParallelProcessing)
  ENDIF(VTK_USE_PARALLEL)
  
  IF(VTK_USE_INFOVIS)
    IF(VTK_USE_CHARTS)
      ADD_SUBDIRECTORY(Charts/Cxx)
    ENDIF(VTK_USE_CHARTS)
    ADD_SUBDIRECTORY(Infovis/Cxx)
    IF(VTK_USE_N_WAY_ARRAYS)
      ADD_SUBDIRECTORY(Array/Cxx)
    ENDIF(VTK_USE_N_WAY_ARRAYS)
  ENDIF(VTK_USE_INFOVIS)
   IF(VTK_USE_QVTK)
    ADD_SUBDIRECTORY(GUI/Qt)
  ENDIF(VTK_USE_QVTK)
   IF(WIN32)
    ADD_SUBDIRECTORY(GUI/Win32/SimpleCxx)
     IF(VTK_USE_MFC)
      ADD_SUBDIRECTORY(GUI/Win32/SampleMFC)
      ADD_SUBDIRECTORY(GUI/Win32/vtkMFC)
    ENDIF(VTK_USE_MFC)
  ENDIF(WIN32)
ENDIF(VTK_USE_RENDERING)
